<template>
    <view class="main">
        <button class="btn" type="warn" @click="logout()">退出</button>
    </view>
</template>

<script>
    export default {
        name: 'logout',
        data() {
            return {

            }
        },
        methods: {
            logout: function() {
                // #ifndef H5
                uni.clearStorageSync();
                // #endif
                // #ifdef H5
                sessionStorage.clear()
                // #endif
                uni.redirectTo({
                    url: '/pages/number/login'
                })
            }
        }
    }
</script>

<style lang="scss" scoped>
    .main {
        margin: {
            top: 20rpx;
        }

        ;
        .btn{
            width: 94%;
            font-size: 32rpx;
        }
    }
</style>